package com.atguigu.serviceBash;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 自定义异常信息
 *
 * @author zy
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GlobalException extends RuntimeException {
    private String message;
    private Integer code;

    /**
     * @param message 异常信息
     * @param code    状态码
     */
    public GlobalException(String message, Integer code) {
        this.message = message;
        this.code = code;
    }
}
